import collections


class LoggingDict(dict):
    def __setitem__(self, key, value):
        print('Setting %r to %r' % (key, value))
        super().__setitem__(key, value)


class LoggingOD(LoggingDict, collections.OrderedDict):  # 钻石环！
    pass


od = LoggingOD()
od[1] = 'test1'
od[2] = 'test2'
od['12e12e'] = 'testdqwdqwd'
od[55.53] = '...test'
print(od)

print(LoggingOD.__mro__)